feat(lint): extract static metadata validators into @objectstack/lint (ADR-0019 P3)#2215
Merged
Conversation
… (ADR-0019 P3) New public package @objectstack/lint holds the pure, build-time metadata validators as (stack) => Finding[] functions, so the same rules run wherever a stack can be assembled — the CLI's `os validate`/`compile` and any other consumer (notably AI authoring) — instead of being trapped in CLI internals. First release moves the two the AI build needs: - validateWidgetBindings (ADR-0021 widget→dataset→measure/dimension + aggregation coherence) - validateStackExpressions (ADR-0032 CEL/predicate validity) @objectstack/cli imports both from @objectstack/lint (was ./utils/*) — pure move, no behavior change (cli builds, 62 moved tests pass). Dependency direction is one-way lint→spec; never a runtime dep, never bundled into a frontend — which is why these do NOT live in the frontend-facing @objectstack/spec. Filesystem-coupled (lint-liveness-properties) and command-coupled (score→lintConfig) checks stay in the CLI for a later increment.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
📓 Docs Drift CheckThis PR changes 2 package(s): 15 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:
|
New public package must be in the changesets 'fixed' lockstep group (CI gate 'Validate Package Dependencies').
This was referenced Jul 16, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ADR-0019 Phase 3. Gives the pure, build-time metadata validators a clean public home so consumers other than the CLI (notably the AI build) can run them — instead of being trapped in
cli/src/utils/where only the CLI can reach them.What
@objectstack/lint— pure(stack) => Finding[]validators, no I/O, no runtime, never bundled into a frontend.validateWidgetBindings(ADR-0021 — widget→dataset→measure/dimension + measure-aggregation coherence)validateStackExpressions(ADR-0032 — CEL/predicate validity)@objectstack/cliimports both from@objectstack/lint(was./utils/*) — pure move, no behavior change.Why not in
@objectstack/specspecis the frontend-facing contract (ships to the browser). Build-time validators don't belong there — it inverts layering and bloats the frontend bundle. Dependency direction is one-waylint → spec.Scope
Filesystem-coupled (
lint-liveness-properties) and command-coupled (score→ cli'slintConfig) checks deliberately stay in the CLI for a later increment.Verification
@objectstack/lintbuilds (ESM + CJS + DTS); 62 moved tests pass.@objectstack/clirebuilds clean consuming the package (type-level + runtime import verified)../utils/*paths anywhere in the tree.Next (separate PR): cloud's AI build (
service-ai-studio) assembles its staged drafts into a stack and runs these validators atverify_build(ADR-0019 P2).🤖 Generated with Claude Code